OIPA Setup - Tomcat
-
Create a directory on the Tomcat server to store various configuration files for OIPA (i.e., /%Tomcat_Home%/shared or C:\Tomcat\shared).
-
Create subdirectories inside the directory from Step 1 called conf.
-
Copy PASJava-Tomcat.war file from the OIPA distribution zip file into the webapps subdirectory of Tomcat server (Ex : /%Tomcat_Home%/webapps or D:\Tomcat\webapps).
-
Rename the war to PASJava.war.
-
Copy the database drivers into lib directory of Tomcat (%Tomcat_Home%/lib) folder.
-
Oracle – No need to copy this driver. It is already part of the War lib folder.
-
Microsoft SQL Server – Use the compatible jdbc driver shipped with MS SQL Server software. These files are not available for download. Contact your IT department if you need assistance locating these files.
-
IBM DB2 – Use the compatible jdbc driver shipped with DB2 software. These files are not available for download. Contact your IT department if you need assistance locating these files.
-
-
Use a text editor to open the PAS.properties file that you just copied to the server. The PAS.properties file contains properties for Oracle, SQL Server and DB2 database types, with the Oracle settings active by default. The inactive settings are commented out with a '#' character at the start of each line. To change a setting, remove the '#' from the required property setting, and insert it at the beginning of the setting you want to de-activate.
-
The properties setting must match the type of database being used.
Note: Refer to the System Properties document in the Oracle Insurance Policy Administration E62439-01 Documentation Library on the OTN for a complete list of all properties and allowed values.
1. application.databaseType
2. jpa.databasePlatform.
-
Identify the default locale in the PAS.properties file. The locale selected will determine the translation that is loaded in the database for OIPA when it launches.
-
application.defaultLocale.
-
-
If using an Oracle or Microsoft SQL Server database, please skip this step. If using a DB2 database, you will need to modify the PAS.properties file to include configuration for case-insensitive searching. Modify the PAS.properties file to include the following line:
-
search.field.text.caseInsensitive=true.
-
-
Use application.keyStorePath and application.keyStoreAlias.
-
application.keyStorePath - Absolute path including file name where the oipakeystore.p12 is located. Example: application.keyStorePath = /scratch/oipa/Oracle/oipa/conf/oipakeystore.p12.
-
application.keyStoreAlias - The alias is a unique identifier for the key entry (secret key) in the keystore.Do not modify this value unless the customer rotates the encryption key.
-
-
Use a text editor to open the logging.properties file that you just copied to the server. Edit the path mention for property "java.util.logging.FileHandler.pattern" with new application log location i.e. if application log location is /home/OIPA/logs then set this value as java.util.logging.FileHandler.pattern = %h/OIPA/logs/oipa%u.log. Also same time make sure that directory is created and has r/w permission.
-
Extension classes/jars developed using OIPA extension interfaces should be copied to PASJava-.war/WEB-INF/lib before copying PASJava.war to the war subdirectory. This is required for the extensions to work that an application like OIPA need to run.
Set Environment Variables - Tomcat
-
For Windows deployment we need to create setenv.bat file in the bin folder of extracted Tomcat directory.
-
For Linux deployment we need to create setenv.sh file in the bin folder of extracted Tomcat directory.
The following configuration needs to be placed in the setenv.bat file for Windows environment
Classpath
set CATALINA_OPTS=-Xms128m -Xmx1024m -XX:+UseG1GC -Dtangosol.coherence.cacheconfig="C:/<Server Path>/shared/conf/coherence-cache-config.xml" -Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml -Dtangosol.coherence.override="C:/<Server Path>/shared/conf/coherence-config.xml" -Dtangosol.coherence.distributed.localstorage=true -Djava.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory -Dtangosol.coherence.mode=prod -Djava.util.logging.config.file="C:/<Server Path>/shared/conf/logging.properties" -Djakarta.xml.bind.JAXBContextFactory=org.glassfish.jaxb.runtime.v2.JAXBContextFactory -Dserver.name="<Name of the server>" set OIPA_KEYSTORE_PWD=changeit |
For Linux env in setenv.sh
ClassPath
export CATALINA_OPTS="-Xms128m -Xmx1024m -XX:+UseG1GC -Dtangosol.coherence.cacheconfig=/Servers/Tomcat/OIPAInstance/shared/conf/coherence-cache-config.xml -Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml -Dtangosol.coherence.override=/Servers/Tomcat/OIPAInstance/shared/conf/coherence-config.xml -Dtangosol.coherence.distributed.localstorage=true -Dtangosol.coherence.mode=prod -Djava.util.logging.config.file=/Servers/Tomcat/OIPAInstance/shared/conf/logging.properties -Djava.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory -Djakarta.xml.bind.JAXBContextFactory=org.glassfish.jaxb.runtime.v2.JAXBContextFactory -Dserver.name=<Name of the server>" export OIPA_KEYSTORE_PWD="changeit" |
Note:
1. To enable remote debugging
Debug - -agentlib:jdwp=transport=dt_socket,address=1043,server=y,suspend=n
2. To Enable JMX event to Admin Console Application
Add to Existing class path -
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote.port=<Unique Port Number>
If servers JMX port is not getting exposed to jconsole or adminconsole use below argument as well in that server arguments. ip address should be server actual ip address.
Rmi Port-Djava.rmi.server.hostname=ipaddress
Note: For the Tomcat distribution, the setenv file is provided under the Tomcat folder. Please review it and update the paths to match the paths configured on your server.
Creating Data Sources
<App_ContextName>.xml is the file where all the data sources are defined. Any data source, which is needed by an application to run, has to be configured in this file. OIPA requires ADMINSREVERDS, ADMINSERVERSOURCEDS, ASMINSERVERSEARCHDS, and ADMINSERVERREADONLYDS data sources to be created.
<%CATALINA_BASE%>\conf\Catalina\<HostName>\<App_DeploymentName>.xml. Catalina scans that directory and read the web application Context at runtime.
Sample configuration of all the data sources which are required for OIPA to run:
Note: We can find this <App_DeploymentName>.xml in generated distribution under tomcat\conf\Catalina\localhost. Copy this file to <%CATALINA_BASE%>\conf\Catalina\<HostName> and Please update jdbcDriver, jdbcUrl properties accordingly for the respective Databases.
Data Sources
Note: Below configuration is a sample for Oracle DB. Please update jdbcDriver, jdbcUrl properties accordingly for the respective Databases
PASJava.xml at above defined location.
<?xml version="1.0" encoding="UTF-8"?> <Context> <Resource name="ADMINSERVERDS" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:FREE" username="V12" password="V12" maxTotal="50" maxIdle="10" maxWaitMillis="-1" validationQuery="SELECT 1 FROM DUAL" testOnBorrow="true" /> <Resource name="ADMINSERVERRESOURCEDS" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:FREE" username="V12" password="V12" maxTotal="50" maxIdle="10" maxWaitMillis="-1" validationQuery="SELECT 1 FROM DUAL" testOnBorrow="true" /> <Resource name="ADMINSERVERSEARCHDS" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:FREE" username="V12" password="V12" maxTotal="50" maxIdle="10" maxWaitMillis="-1" validationQuery="SELECT 1 FROM DUAL" testOnBorrow="true" /> <Resource name="ADMINSERVERREADONLYDS" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:FREE" username="V12" password="V12" maxTotal="50" maxIdle="10" maxWaitMillis="-1" validationQuery="SELECT 1 FROM DUAL" testOnBorrow="true" /> <Resource name="OIPAAUDITDS" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:FREE" username="V12" password="V12" maxTotal="50" maxIdle="10" maxWaitMillis="-1" validationQuery="SELECT 1 FROM DUAL" testOnBorrow="true" /> </Context> |
Note: In case of change in your domain, In %CATALINA_BASE%\conf\server.xml, find the <Engine> / <Host> section, typically
Change Host
<Engine name="Catalina" defaultHost="mydomain.com"> <Host name="mydomain.com" appBase="webapps" ...> |
Change the path %CATALINA_BASE%\conf\Catalina\mydomain.com\<app-contextfile>.xml. Then Tomcat will load /<app> (.i.e PASJava) for the virtual host mydomain.com.
Configuring Ports
The server.xml should be configured with unique port numbers
Server.xml
Port Configuration
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8803" maxParameterCount="1000" xpoweredBy="false" server="Apache Tomcat" /> |
The catalina.properties file in the conf folder needs to be modified so as to make the Tomcat container to pick custom configuration or CR jars defined by user.
Application shared/lib folders
|
|
Deploying OIPA
-
Rename the OIPA war from the distribution to PASJava.war.
-
Deploy OIPA war in webapps folder of Tomcat application server.
-
Navigate to the bin folder of Tomcat and open the command prompt in this location to start the server by using the command
-
Windows - - startup.bat run
-
Linux - ./startup.sh start
-
-
Test the deployment with the url: http://hostname:port/PASJava/
Note: If you change the context name, use that name in the URL instead of PASJava.